package com.castile.parking.member.controller;

import com.castile.parking.member.entity.Member;
import com.castile.parking.member.service.IMemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @author: Castile
 * @create: 2024-04-20 17:45
 * @Version 1.0
 **/
@RestController
@RequestMapping("/member")
@Slf4j
@Api(value = "Member会员控制器服务", tags = "Member会员控制器服务相关接口")
public class MemberController {

    private static final Logger LOGGER = LoggerFactory.getLogger(MemberController.class);

    @Autowired
    private IMemberService memberService;

    @RequestMapping("/list")
    @ApiOperation(value = "列出所有会员", notes = "返回当前的会员列表")
    public List<Member> list() {
        List<Member> members = memberService.list();
        log.debug("query member list=" + members);
        return members;
    }


}
